from wtforms import Form, StringField
from wtforms.validators import DataRequired, Regexp


class DriftForm(Form):
    recipient_name = StringField(validators=[DataRequired('请输入收件人姓名！')])
    mobile = StringField(validators=[Regexp(r'^1[3456789]\d{9}$', message='请输入正确格式的手机号！')])
    address = StringField(validators=[DataRequired('请输入收件地址')])
    message = StringField()
